package com.honghu.villagepost.widget;

import android.content.Context;

import androidx.annotation.NonNull;

import com.honghu.villagepost.R;
import com.lxj.xpopup.core.BottomPopupView;

/**
 * @author: mqwang
 * @create: 2/20/21 11:36 AM
 * @Description:
 */
public class PayPopup extends BottomPopupView {

    private final OnClick onClick;

    public interface OnClick{
        void onclick();
    }

    public PayPopup(@NonNull Context context, OnClick onClick) {
        super(context);
        this.onClick = onClick;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.popup_pay;
    }

    @Override
    protected void onCreate() {
        super.onCreate();

        findViewById(R.id.tv_alipay).setOnClickListener(v ->{

        });

        findViewById(R.id.tv_weicha).setOnClickListener(v ->{
            if (onClick != null){
                onClick.onclick();
            }
        });

        findViewById(R.id.tv_cancel).setOnClickListener(v ->{
            this.dismiss();
        });

    }
}
